﻿<UserControl x:Class="VmroleAuthor.Views.SaveAsFileWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
              d:DesignWidth="700">
    <Grid  VerticalAlignment="Top" ShowGridLines="False">
        <Grid.RowDefinitions >
            <RowDefinition Height="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition MinHeight="30" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="6" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="6"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="6"/>
        </Grid.ColumnDefinitions>


        <!-- Save As FileLocation-->
        <Label Grid.Row="1" Grid.Column="0" >New File Location</Label>
        <Grid  Grid.Row="1" Grid.Column="2" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" x:Name="FileLocation"  ></TextBox>
            <!-- Browse Button-->
            <Button Grid.Column="2" Margin="0" Padding="0" DockPanel.Dock="Right" MinWidth="50" Click="BrowseFile">...</Button>
        </Grid>
        <ContentPresenter Grid.Row="2" Grid.Column="2" Content="{Binding ElementName=FileLocation, Path=(Validation.Errors).CurrentItem}" />


        <!-- Working Dir -->
        <Label Grid.Row="3" Grid.Column="0" >New Working Directory</Label>
        <TextBox x:Name="WorkingDir" Grid.Row="3" Grid.Column="2" />

        <TextBlock Grid.Row="4" Grid.Column="2" MaxWidth="700" TextWrapping="Wrap"> This directory is used for the extracted contents of the package. It contains the json file(s) and the application payloads. If the directory with the same name already exists, its contents will be overwritten.The contents of this directory will be re-packaged when saved.</TextBlock>


        <!-- Insert or Delete Rows using button -->
        <StackPanel Orientation = "Horizontal" HorizontalAlignment="Right" Grid.Row="5" Grid.Column="2" >
            <Grid>
                <Grid.RowDefinitions >
                    <RowDefinition Height="6" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="6" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="10"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="10"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Button Grid.Row="1" Grid.Column="1"  Click="OkButton_Click" >
                    <StackPanel Orientation = "Horizontal" HorizontalAlignment="Right">
                        <TextBlock MinWidth="50">OK</TextBlock>
                        <Image Source="..\Img\addgreen.png" Width="20" Height="20"></Image>
                    </StackPanel>
                </Button>
                <Button Grid.Row="1" Grid.Column="3"  Click="CancelButton_Click">
                    <StackPanel Orientation = "Horizontal" HorizontalAlignment="Right">
                        <TextBlock MinWidth="50">Cancel</TextBlock>
                        <Image Source="..\Img\deletered.png" Width="20" Height="20"></Image>
                    </StackPanel>
                </Button>
            </Grid>
        </StackPanel>

    </Grid>
</UserControl>
